# -*- coding: utf-8 -*-
from datetime import timedelta
from airflow.operators.bash import BashOperator
from jms.dm.cusc_report.dm_cusc_entity_customer_network_province_kg_summary_month_dt import \
    jms_dm__dm_cusc_entity_customer_network_province_kg_summary_month_dt
from jms.time_sensor.time_after_05_00 import time_after_05_00

jms_oracle__dm_cusc_entity_customer_network_province_kg_summary_month_dt_one = BashOperator(
    task_id='jms_oracle__dm_cusc_entity_customer_network_province_kg_summary_month_dt_one',
    execution_timeout=timedelta(hours=2),
    email=['shenjiaming@jtexpress-scm.com', 'yl_etl@yl-scm.com'],
    bash_command="jms/oracle/cusc_report/dm_cusc_entity_customer_network_province_kg_summary_month_dt/execute.sh",
    pool='spmi_apack',
    retries=0,
    pool_slots=2,
)

jms_oracle__dm_cusc_entity_customer_network_province_kg_summary_month_dt_one << [
    jms_dm__dm_cusc_entity_customer_network_province_kg_summary_month_dt
    , time_after_05_00
]

jms_oracle__dm_cusc_entity_customer_network_province_kg_summary_month_dt_two = BashOperator(
    task_id='jms_oracle__dm_cusc_entity_customer_network_province_kg_summary_month_dt_two',
    execution_timeout=timedelta(hours=2),
    email=['shenjiaming@jtexpress-scm.com', 'yl_etl@yl-scm.com'],
    bash_command="jms/oracle/cusc_report/dm_cusc_entity_customer_network_province_kg_summary_month_dt/execute2.sh",
    pool='spmi_apack',
    retries=0,
    pool_slots=2,
)

jms_oracle__dm_cusc_entity_customer_network_province_kg_summary_month_dt_two << [
    jms_oracle__dm_cusc_entity_customer_network_province_kg_summary_month_dt_one
]
